package com.yc.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yc.entity.Categorysecond;
import com.yc.mapper.CategorysecondMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * InnoDB free: 5120 kB; (`cid`) REFER `test/category`(`cid`); (`cid`) REFER `test/ 前端控制器
 * </p>
 *
 * @author ly
 * @since 2022-05-08
 */
@Controller
@RequestMapping("//categorysecond")
public class CategorysecondController {
    @Resource
    private CategorysecondMapper categorysecondMapper;

    @RequestMapping("queryCategorysecond.do")
    @ResponseBody
    public List< Categorysecond > queryCategorysecond(int cid){
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("cid",cid);
        List< Categorysecond > list=categorysecondMapper.selectList(wrapper);
        return list;
    }
}

